<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <title>国内折扣详情</title>
</head>
<link rel="stylesheet" href="css/getinland.css">
<link href="lib/bootstrap/css/bootstrap.css" rel="stylesheet">
<script src="lib/html5shiv/html5shiv.min.js"></script>
<script src="lib/respond/respond.js"></script>
<script src="js/template.js"></script>
<script src="lib/jquery/jquery.js"></script>
<script src="js/getinlanddiscount.js"></script>
<body>
<!--顶部-->
<div class="shen clearfix ">
    <a href="inlanddiscount.html" class="glyphicon glyphicon-chevron-left fl"></a>
    <div class="fl">国内折扣详情</div>
    <img src="images/header_app.png" alt="" class="fr">
</div>


<!--商品-->
<div class="main"></div>
<!--买-->
<div class="qu"><div>前往购买</div></div>

<!--底部-->
<ul class="na clearfix" role="tablist">
    <li><a href="#">登陆</span></a></li>
    <li><a href="#">注册</a></li>
    <li><a href="#">返回顶部 </a></li>
</ul>
<div class="gong">手机APP下载<a href=""> 慢慢买手机版 --掌上比价平台</a>
    <p>m.m.maimai.com</p>
</div>
</body>
<script>
        console.log(location.search);

    $.ajax({
        type: 'get',
        url: 'http://192.168.23.81:3000/api/getdiscountproduct'+location.search,
        dataType: 'json',
        success:function (data) {
            console.log(data)
            var html=template("template",data)
            $(".main").html(html)
        }
    })
</script>
<script type="text/html" id="template">
    {{if result}}
    {{each result as value}}
        <p class="name">{{value.productName}}</p>
        <p class="price">{{value.productPrice}}</p>
        <p class="three">
            <span class="productfrom">{{value.productFrom}}</span>
            <span class="producttime">{{value.productTime}}</span>
            <span class="producttips">{{value.productTips}}</span>
        </p>
    <p class="productinfo">{{value.productInfo}}</p>
    <p class="productimg">{{#value.productImg}} </p>
    <div class="qu"><div>前往购买</div></div>
    {{#value.productComment}}
    {{/each}}
    {{/if}}
</script>
</html>